<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <title>vue-form_submit</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/css/bootstrap.min.css"
        integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
</head>

<body>
    <div id="app" class="container">
        <form action="# " v-on:submit="login">
            <div class="form-group">
                <label for="email">邮箱</label>
                <input type="email" class="form-control" id="email" v-model.lazy="registered.email">
            </div>
            <div class="form-group">
                <label for="password">密码</label>
                <input type="password" class="form-control" id="password" v-model="registered.password">
            </div>
            <div class="form-group">
                <label for="confirm_password">确认密码</label>
                <input type="password" class="form-control" id="confirm_password" v-model.lazy="registered.confirm_password">
            </div>
            <br>
            <button type="submit" class="btn btn-success">登录</button>
        </form>
       <div>
           <p>{{registered}}</p>
       </div>
    </div>
</body>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
    var app = new Vue({
        el: "#app",
        data: {
            registered:{
            email: "",
            password: "",
            confirm_password:""
        }
        },
        methods: {
            login: function () {
        alert('ok');
            }
        }
    })
</script>

</html>